Skip to content

fix(bigquery): handle METASTORE and unknown table types in TableDefinition.fromPb - #15076

Open
vejeta wants to merge 1 commit into
googleapis:mainfrom
vejeta:fix-bigquery-metastore-table-type
Open

vejeta wants to merge 1 commit into
googleapis:mainfrom
vejeta:fix-bigquery-metastore-table-type

Conversation

@vejeta

@vejeta vejeta commented Nov 19, 2026

Copy link
Copy Markdown

BigLake Iceberg tables come back as "type": "METASTORE", and TableDefinition.fromPb threw on them, breaking listTables, getTable and Dataset.list.

  • Add Type.METASTORE, parsed as ExternalTableDefinition (keeps sourceFormat/sourceUris).
  • Unknown types no longer throw: fall back to ExternalTableDefinition or StandardTableDefinition, keeping the original type.
  • New TableDefinitionTest. Fails on main, passes with the fix; full unit suite green.

Fixes #12159

…ition.fromPb

BigLake Iceberg tables are returned with type METASTORE, which made
fromPb throw and broke listTables/getTable. Parse METASTORE as an
external table and fall back instead of throwing for unknown types.

Fixes googleapis#12159

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for the METASTORE table type (such as BigLake Iceberg tables) in TableDefinition and updates the fromPb method to gracefully handle unknown future table types instead of throwing an exception. Specifically, unknown types with an external data configuration are mapped to ExternalTableDefinition, while others default to StandardTableDefinition. Comprehensive unit tests have been added to verify these behaviors. I have no feedback to provide as the implementation is clean and well-tested.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[java-bigquery] BigQuery: METASTORE format not supported.

1 participant